package com.ddc.study.feature.main.home;

import com.ddc.study.base.BasePresenter;
import com.ddc.study.base.BaseView;
import com.ddc.study.entity.Article;
import com.ddc.study.entity.Banner;
import com.ddc.study.entity.MainData;

import java.util.List;

import androidx.annotation.IntRange;
import androidx.annotation.Nullable;

/**
 * Created on 2018/3/30.
 *
 * @author lshun
 * @version 1.0
 */
interface HomeContract {
    interface IModel {

    }

    interface IView extends BaseView {
        void showBanner(@Nullable List<Banner> data);

        void showData(@Nullable MainData<Article> data);

        void showCollectResult(int id, boolean result);

        void showUnCollectResult(int id, boolean result);

        boolean isLoggedIn();

        void needLogin();
    }

    abstract class IPresenter extends BasePresenter<IView> {
        abstract void loadBanner();

        abstract void loadData(@IntRange(from = 0) int page);

        abstract void collectArticle(int id);

        abstract void unCollectArticle(int id);
    }
}